<a class="menu-toggler" id="menu-toggler" href="#">
	<span class="menu-text"></span>
</a>
<div class="sidebar" id="sidebar">
	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
	</script>

	<div class="sidebar-shortcuts" id="sidebar-shortcuts">
		<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
			<button class="btn btn-success">
				<i class="icon-signal"></i>
			</button>

			<button class="btn btn-info">
				<i class="icon-pencil"></i>
			</button>

			<button class="btn btn-warning">
				<i class="icon-group"></i>
			</button>

			<button class="btn btn-danger">
				<i class="icon-cogs"></i>
			</button>
		</div>

		<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
			<span class="btn btn-success"></span>
			<span class="btn btn-info"></span>
			<span class="btn btn-warning"></span>
			<span class="btn btn-danger"></span>
		</div>
	</div><!-- #sidebar-shortcuts -->

	<#if request.requestUri??>
		<#assign menuPath=request.requestUri?substring(base?length,request.requestUri?length)/>
		<#if menuPath??>
			<#if menuPath?index_of('/',2) !=-1>
				<#assign reMenuPath=menuPath?substring(0,menuPath?index_of('/',2))/>
			<#else>
				<#assign reMenuPath=''/>
			</#if>
		</#if>
	</#if>
	
	<ul class="nav nav-list">
		<@shiro.hasPermission name= "/erp">
		<li>
			<a href="#" class="dropdown-toggle">
				<i class="icon-globe"></i>
				<span class="menu-text"> ERP管理</span>
				<b class="arrow icon-angle-down"></b>
			</a>
			<ul class="submenu" style="">
				<@shiro.hasPermission name= "/suppiler/list">
				<li <#if reMenuPath=="/suppiler">class="active"</#if>>
					<a href="${base}/suppiler/list">
						<i class="icon-double-angle-right"></i>
						供应商管理
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/materiel/list">
				<li <#if reMenuPath=="/materiel">class="active"</#if>>
					<a href="${base}/materiel/list">
						<i class="icon-double-angle-right"></i>
						物料管理
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/purchaseOrders/list">
				<li <#if reMenuPath=="/purchaseOrders">class="active"</#if>>
					<a href="${base}/purchaseOrders/list">
						<i class="icon-double-angle-right"></i>
						采购单
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/sellOrders/list">
				<li <#if reMenuPath=="/sellOrders">class="active"</#if>>
					<a href="${base}/sellOrders/list">
						<i class="icon-double-angle-right"></i>
						出库单
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/customer/list">
				<li <#if reMenuPath=="/customer">class="active"</#if>>
					<a href="${base}/customer/list">
						<i class="icon-double-angle-right"></i>
						客户管理
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/contract/list">
				<li <#if reMenuPath=="/contract">class="active"</#if>>
					<a href="${base}/contract/list">
						<i class="icon-double-angle-right"></i>
						合同管理
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/employee/list">
				<li <#if reMenuPath=="/employee">class="active"</#if>>
					<a href="${base}/employee/list">
						<i class="icon-double-angle-right"></i>
						员工管理
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/attendance/list">
				<li <#if reMenuPath=="/attendance">class="active"</#if>>
					<a href="${base}/attendance/list">
						<i class="icon-double-angle-right"></i>
						考勤管理
					</a>
				</li>
				</@shiro.hasPermission>
				<@shiro.hasPermission name= "/salary/list">
				<li <#if reMenuPath=="/salary">class="active"</#if>>
					<a href="${base}/salary/list">
						<i class="icon-double-angle-right"></i>
						工资统计
					</a>
				</li>
				</@shiro.hasPermission>
			</ul>
		</li>
		</@shiro.hasPermission>

		<@shiro.hasPermission name= "/system">
		<li>
			<a href="#" class="dropdown-toggle">
				<i class="icon-cogs"></i>
				<span class="menu-text"> 系统管理</span>
				<b class="arrow icon-angle-down"></b>
			</a>
			<ul class="submenu" style="">
				<@shiro.hasPermission name= "/dept/list">
				<li <#if reMenuPath=="/dept">class="active"</#if>>
					<a href="${base}/dept/list">
						<i class="icon-double-angle-right"></i>
						部门管理
					</a>
				</li>
				</@shiro.hasPermission>

				<@shiro.hasPermission name= "/job/list">
				<li <#if reMenuPath=="/job">class="active"</#if>>
					<a href="${base}/job/list">
						<i class="icon-double-angle-right"></i>
						职位管理
					</a>
				</li>
				</@shiro.hasPermission>

				<@shiro.hasPermission name= "/resources/list">
				<li <#if reMenuPath=="/resources">class="active"</#if>>
					<a href="${base}/resources/list">
						<i class="icon-double-angle-right"></i>
						资源管理
					</a>
				</li>
				</@shiro.hasPermission>

				<@shiro.hasPermission name= "/role/list">
				<li <#if reMenuPath=="/role">class="active"</#if>>
					<a href="${base}/role/list">
						<i class="icon-double-angle-right"></i>
						角色管理
					</a>
				</li>
				</@shiro.hasPermission>

				<@shiro.hasPermission name= "/user/list">
				<li <#if reMenuPath=="/user">class="active"</#if>>
					<a href="${base}/user/list">
						<i class="icon-double-angle-right"></i>
						管理员管理
					</a>
				</li>
				</@shiro.hasPermission>

				<@shiro.hasPermission name= "/accessLogs/list">
				<li <#if reMenuPath=="/accessLogs">class="active"</#if>>
					<a href="${base}/accessLogs/list">
						<i class="icon-double-angle-right"></i>
						日志查看
					</a>
				</li>
				</@shiro.hasPermission>
			</ul>
		</li>
		</@shiro.hasPermission>
	</ul>
	<!-- /.nav-list -->
	<div class="sidebar-collapse" id="sidebar-collapse">
		<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
	</div>
	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
	</script>
</div>